<?xml version="1.0" encoding="ISO-8859-1" ?>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
	  xmlns:a4j="http://richfaces.org/a4j"
	  xmlns:easy="http://easyfaces.com.br/easyfaces">
	  
	
	<f:subview id="subviewManterServico">
	
		<rich:modalPanel id="manterServico" autosized="true"  headerClass="height:20px;" resizeable="false" >
			<f:facet name="header">
				<h:outputText id="id_servico" value="#{servicoBackBean.servicoFormBean.head}" />
			</f:facet>
			
			<f:facet name="controls">
				<h:panelGroup>
					<h:graphicImage value="/images/close.gif" styleClass="botao_fechar_popup" id="hideLink">
						<rich:componentControl for="manterServico" attachTo="hideLink" operation="hide" event="onclick" />
					</h:graphicImage>
				</h:panelGroup>
			</f:facet>
		
		<div class="red">
			<rich:messages id="msgServicoManter"></rich:messages>
		</div>
		
			<h:panelGrid columns="3">
					<h:selectOneRadio id="servico_tipo_servico" disabled="#{servicoBackBean.servicoFormBean.isDisabled}"
					 value="#{servicoBackBean.servicoFormBean.servicoManter.tipoServico}">
					 
						<f:selectItem itemValue="HOTEL" itemLabel="#{bundle.servico_tipo_servico_hotel}" />

						<f:selectItem itemValue="PASSEIO" itemLabel="#{bundle.servico_tipo_servico_passeio}" />
						
						<f:selectItem itemValue="TRANSPORTE" itemLabel="#{bundle.servico_tipo_servico_transporte}" />
						
                        <a4j:support event="onchange" reRender="formServicoManter"/>
					</h:selectOneRadio>
				</h:panelGrid>
	
			
			 <div class="linha"/>
			
			<a4j:form ajaxSubmit="true" id="formServicoManter" reRender="servico_codigo, servico_descricao">
			
                <h:panelGrid columns="2">
                
                	<h:outputLabel value="#{bundle.servico_codigo}:" for="servico_codigo" />
                    <h:inputText id="servico_codigo" value="#{servicoBackBean.servicoFormBean.servicoManter.codigo}" label="#{bundle.servico_codigo}" readonly="true" disabled="#{servicoBackBean.servicoFormBean.isDisabled}" size="5" />
                    
                	<h:outputLabel value="*#{bundle.servico_descricao}:" for="servico_descricao" />
                    <h:inputText id="servico_descricao" value="#{servicoBackBean.servicoFormBean.servicoManter.descricao}" label="#{bundle.servico_descricao}" disabled="#{servicoBackBean.servicoFormBean.isDisabled}" maxlength="50" size="40" />
               
<!--               		<h:outputLabel value="*#{bundle.servico_valor}:" for="servico_valor" /> -->
<!--                     <easy:inputCurrency id="servico_valor" value="#{servicoBackBean.servicoFormBean.servicoManter.valor}" label="#{bundle.servico_valor}" disabled="#{servicoBackBean.servicoFormBean.isDisabled}" decimalSeparator="," groupSeparator="." returnDecimal="true" maxlength="10" size="10"/>	              -->
                </h:panelGrid>
                
                <div class="linha"/>
                
                <a4j:commandButton action="#{servicoBackBean.manterServico}" value="#{bundle.servico_btn_gravar}" id="btnGravar" reRender="formServicoManter" disabled="#{servicoBackBean.servicoFormBean.isDisabled}" />
                
                <a4j:commandButton action="#{servicoBackBean.excluirServico}" value="#{bundle.servico_btn_excluir}" id="btnExcluir" reRender="gridServico" disabled="#{!servicoBackBean.servicoFormBean.isDisabled}" >
                	<rich:componentControl for="manterServico" attachTo="btnExcluir" operation="hide" event="onclick" />
                </a4j:commandButton>
                
                <a4j:commandButton value="#{bundle.servico_btn_voltar}" id="btnVoltar" action="#{servicoBackBean.obterListaServico}"  reRender="gridServico" >
                	<rich:componentControl for="manterServico" attachTo="btnVoltar" operation="hide" event="onclick" />
                </a4j:commandButton>
					
			</a4j:form>

		</rich:modalPanel>
	</f:subview>

</html>